<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>使用Axios在前端页面请求后端数据</title>
<!--    引入axios-->
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script>
        //查询一个
        axios({
            method:'get',
            url:'http://localhost:8099/users/1'
        }).then((result)=> {
            console.log(result.data.data);
        }).catch((err=>{
            console.log(err);
        }))
    </script>
</head>
<body>

</body>
</html>